package com.zhou.org.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * @author lang.zhou
 * @date 2022/8/24 9:59
 */
@Data
@ApiModel("组织架构对象保存模型")
public class OrgDto implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("组织架构id")
    private Integer orgId;

    @ApiModelProperty("描述")
    @Size(max = 100,message = "长度过长")
    private String description;

    @ApiModelProperty(value = "组织架构名称",required = true)
    @NotBlank(message = "不能为空")
    @Size(max = 50,message = "长度过长")
    private String orgName;

    @ApiModelProperty(hidden = true)
    private String iconClass;

    /**
     * 1-用户；2-部门；3-角色
     */
    @ApiModelProperty(value = "组织架构类型",required = true)
    @NotNull(message = "组织架构类型不能为空")
    @Min(1)
    @Max(3)
    private Integer orgType;

    @ApiModelProperty(value = "父id",required = true)
    @NotNull(message = "父id不能为空")
    @Positive
    private Integer pid;
}
